Specialization of Imperative Programs Through Analysis of Relational Expressions
نویسنده
چکیده
An inter-procedural data flow analysis operating on control flow graphs and collecting information about program expressions is described in this paper. The following relational and other expressions are analyzed: equivalences between program expressions and constants; linear-ordering inequalities between program expressions and constants; equalities originating from some program assignments; atomic constituents of controlling expressions of program branches. Analysis is executed by a worklist-based fixpoint algorithm which interprets conditional branches and incorporates a rule-based inference procedure. Two variants of the polyvariant program point specialization using results of the analysis are presented. The both specializations are done at the level of control flow graphs. The variants differ in terms of the size of residual programs.
منابع مشابه
Analysis of the Equality Relations for the Program Terms
In this article an abstract interpretation and formal language based analysis for imperative programs is presented. This analysis makes a lower approximation of the equality relations for the program terms, i.e. for a given program point our analysis produces a set of equalities t1 = t2 where t1 and t2 represent program expressions such that their values are equal for any behavior of the progra...
متن کاملFroid: Optimization of Imperative Programs in a Relational Database
For decades, RDBMSs have supported declarative SQL as well as imperative functions and procedures as ways for users to express data processing tasks. While the evaluation of declarative SQL has received a lot of attention resulting in highly sophisticated techniques, the evaluation of imperative programs has remained näıve and highly inefficient. Imperative programs offer several benefits over ...
متن کاملLearning of Constraint Logic Programs by Combining Unfolding and Slicing Techniques
This paper discusses learning of Constraint Logic Programs using unfolding and slicing technique. The transformation rule for unfolding together with clause removal is a method for specialization of Logic Programs. Slicing is a program analysis technique originally developed for imperative languages. It facilitates the understanding of data flow and debugging. This paper formulates the semantic...
متن کاملEfficient Strongly Relational Polyhedral Analysis
Polyhedral analysis infers invariant linear equalities and inequalities of imperative programs. However, the exponential complexity of polyhedral operations such as image computation and convex hull limits the applicability of polyhedral analysis. Weakly relational domains such as intervals and octagons address the scalability issue by considering polyhedra whose constraints are drawn from a re...
متن کاملA Lightweight Approach to Program Specialization⋆
Within the imperative programming paradigm, program slicing has been widely used as a basis to solve many software engineering problems, like debugging, testing, differencing, specialization, and merging. In this work, we present a lightweight approach to program specialization of lazy functional logic programs which is based on dynamic slicing. The kind of specialization performed by our appro...
متن کامل